package net.sureon.biz;

import java.util.Date;
import java.util.List;

import net.sureon.dao.Application;

public interface ApplicationMgr {

	public Application getApplicationByID(long companyID, long applicationID);

	/**
	 * 插入一个application（申请）
	 * 
	 * @param application
	 * @return
	 */
	public long insertApplication(ApplicationBO application);

	/**
	 * 用户未审核的申请(Pending)
	 */
	public List<Application> getApplicationByUserNotReview(long companyID,
			long userID,int skipResults,int maxResults);

	/**
	 * 用户审核过的申请（包括审核不通过和审核通过/NotApproved,Approved）
	 */
	public List<Application> getApplicationByUserReview(long companyID,
			long userID, int skipResults, int maxResults);

	/**
	 * 未审核的下属申请(Pending)
	 */

	public List<Application> getApplicationByGroupNotReview(long companyID, List<Long> idsAsList, int skipResults, int maxResults);

	
	/**
	 * 审核过的下属申请（包括 NotApproved和Approved）
	 */
	
	public List<Application> getApplicationByGroupReview(long companyID, List<Long> idsAsList, int skipResults, int maxResults);

	public int updateApplication(long companyID, long applicationID, java.util.Date reviewDate,
			long reviewedBy, String reviewNote, String status);

	/**
	 * 删除一条申请信息
	 * 
	 * @param applicationID
	 * @return
	 */
	public int deleteApplication(long companyID, long applicationID);
	
	/*
	 * 处理编辑申请
	 */
	public int editApplication(long companyID, long applicationID,
			String category, Date startDate, Date endDate, float sumTime,
			String note, java.util.Date submitDate) ;
}
